<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>物业管理系统</title>
<base href="<%=basePath%>">
<link rel="stylesheet" href="css/vivo.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css"
	href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css"
	href="static/h-ui.admin/css/H-ui.admin.css" />


<script src="js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="js/sharefunction.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="js/sharefunction.js"></script>
<script type="text/javascript" src="js/webuploader-0.1.5/webuploader.js"></script>
<script type="text/javascript" src="js/layer/layer/layer.js"></script> 

<link href="js/select2/select2.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/select2/select2.min.js"></script>

<link rel="stylesheet" type="text/css"
	href="js/webuploader-0.1.5/webuploader.css" />

<script type="text/javascript">
		$(function(){
	      	 $(".itab ul").idTabs();//tab点击事件 
	      	/*$("[alt]").click(function(){
				var tab = $(this).attr("href");
				if(tab=="#tab5"){
					$("#direction_span").show();
				}else{
					$("#direction_span").hide();
				}
			}); */
			s2init();
			readerMsg();
			var roomType = "${requestScope.roomType}"
			if(roomType=="玄关"){
				$("#sibi").hide();
				$("#ding").show();
				$("#dimian").show();
				$("a[alt='顶']").click();
			}else if(roomType=="平台"){
				$("#sibi").show();
				$("#ding").hide();
				$("#dimian").show();
				$("a[alt='顶']").click();
			}else{
				$("#sibi").show();
				$("#ding").show();
				$("#dimian").show();
			}
			
			//默认选中
		});
		
		function readerMsg(){
			//读取添加状态
			var msg="${requestScope.msg}";
			if(msg=="succez"){
				layer.msg('添加成功！');
			}else if(msg=="error"){
				layer.msg('添加失败！');
			}
		}
		function s2init(){
			//初始化select2插件
			var $s2=$("#id_label_multiple").select2({minimumResultsForSearch: -1});
			var data=["东","南","西","北"];
			for(var i=0;i<data.length;i++){
				$("#id_label_multiple").append("<option value="+data[i]+">"+data[i]+"</option>");
			}
			$s2.val("<%=request.getParameter("direction")%>").trigger("change");
			//增加change事件
			$("#id_label_multiple").on("change",function(){
				openAddCheck($(this).val());
			});
		}
		//打开页面页面
		function openAddCheck(t){
			var url="project/roomInfo/openAddCheck?direction="+t;
			location.replace(url)
		}
		
</script>
<style type="text/css">
.style_l {
	float: left;
	padding: 0 80px 20px 0px;
}

fieldset {
	border-width: 0;
	padding: .35em .625em .75em;
	margin: 0 2px;
	border: 1px solid #c0c0c0;
}
#id_label_multiple{
	width:100px;
}
</style>
</style>
</head>
<body>
	<div class="page-container" style="padding:10px 10px 0px 20px;">
		<div id="usual2" class="usual">
			<div class="itab">
				<ul>
					<li id="sibi"><a href="#tab5" class="selected" alt="四壁">四壁</a></li>
					<li id="ding"><a href="#tab6" alt="顶">顶</a></li>
					<li id="dimian"><a href="#tab7" alt="地面">地面</a></li>
				</ul>
			</div>
			<!-- 四壁start -->
			<div id="tab5" class="tabson">
				<%@include file="decorationWalls-add.jsp"%>
				<%-- <jsp:include page="decorationWalls-add.jsp"></jsp:include> --%>
			</div>
			<!-- 四壁end -->
			<!-- 顶start -->
			<div id="tab6" class="tabson">
				<%@include file="decorationProof-add.jsp"%>
				<%--  <jsp:include page="decorationProof-add.jsp"></jsp:include> --%>
			</div>
			<!-- 顶end -->
			<!-- 地面start -->
			<div id="tab7" class="tabson">
				<%@include file="decorationLand-add.jsp"%>
				<%-- <jsp:include page="decorationLand-add.jsp"></jsp:include> --%>
			</div>
			<!-- 地面end -->
		</div>
	</div>
</body>

</html>

